<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    /* 只有输入指定内容时，搜索按钮才可以点击，否则就禁用 */
    input:placeholder-shown + button {
      cursor: not-allowed;
      border-color: #a19196;
      background-color: #a19196;
      color: #fff;
      outline: none;
    }
  </style>
</head>
<body>
  
  <input type="text" placeholder="输入内容搜索">
  <button>搜索</button>
</body>
</html>